import request from '@/router/axios'

// 敏感词词库列表
export function sensitiveWordsList(params) {
    return request({
        url: '/cp/sensitiveword/page',
        method: 'get',
        params: params
    })
}
//敏感词分组下拉列表
export function sensitiveWordsGroupList() {
    return request({
        url: '/cp/sensitivewordgroup/select',
        method: 'get'
    })
}
//添加敏感词分组
export function sensitiveWordsGroupAdd(query) {
    return request({
        url: '/cp/sensitivewordgroup',
        method: 'post',
        params: query
    })
}

export function sensitiveWordsGroupUp(query) {
    return request({
        url: '/cp/sensitivewordgroup',
        method: 'put',
        params: query
    })
}
// 新增敏感词
export function sensitiveWordsAdd(obj) {
    return request({
        url: '/cp/sensitiveword',
        method: 'post',
        data: obj
    })
}
// 修改敏感词
export function sensitiveWordsEdit(obj) {
    return request({
        url: '/cp/sensitiveword/update',
        method: 'put',
        data: obj
    })
}
// 删除敏感词
export function delSensitiveWords(sensitiveWordId) {
    return request({
        url: `/cp/sensitiveword/${sensitiveWordId}`,
        method: 'delete',
    })
}
//关闭/开启敏感词
export function sensitiveWordsStatus(query) {
    return request({
        url: '/cp/sensitiveword',
        method: 'put',
        params: query
    })
}
// 敏感词移动
export function sensitiveWordsMove(query) {
    return request({
        url: '/cp/sensitiveword/move',
        method: 'put',
        params: query
    })
}